<template>
	<view class="form-test">
		<vol-alert>
			<view>生产计划</view>
		</vol-alert>
		<view class="charts-box v-form-item">
			<u-cell-group>
				<u-cell
				    size="large"
				    title="今日生产计划（辆）"
				    :value="curr_day_plan"	     
				></u-cell>
				<u-cell
				    size="large"
				    title="今日已上线（辆）"
				    :value="curr_day_on"   
				></u-cell>
				<u-cell
				    size="large"
				    title="今日已下线（辆）"
				    :value="curr_day_off"
				></u-cell>
				<u-cell
				    size="large"
				    title="本月上线数量（辆）"
				    :value="m_total_on"
				></u-cell>
				<u-cell
				    size="large"
				    title="本月下线数量（辆）"
				    :value="m_total_off"
				></u-cell>
				<u-cell
				    size="large"
				    title="本月生产计划（辆）"
				    :value="m_total_plan"
				></u-cell><u-cell
				    size="large"
				    title="本年累计下线（辆）"
				    :value="y_off"
				></u-cell>
			</u-cell-group>
		</view>
		
		<vol-alert>
			<view>当前生产订单执行状态</view>
		</vol-alert>
		<view class="charts-box v-form-item">
			<qiun-data-charts style="height: 400rpx;" type="ring" :chartData="chartData" />	
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
				chartData: {
					"series": [{
						"name": "XX",
						"data": 70
					}]
				},
				y_off:0,
				m_total_plan:0,
				curr_day_plan:0,
				m_total_on:0,
				curr_day_on:0,
				m_total_off:0,
				curr_day_plan:0,
				curr_day_off:0,
			}
		},
		methods: {

		},
		onShow() {
			
			this.http.get("/api/customer_jr_mobile/product_about", {}, true).then((s) => {
				//console.log(s);
				this.y_off=s.y_off[0].sum
				this.m_total_plan=s.m_total_plan
				this.curr_day_plan=s.curr_day_plan
				this.m_total_on=s.m_total_on
				this.curr_day_on=s.curr_day_on
				this.m_total_off=s.m_total_off
				this.curr_day_off=s.curr_day_off
			});
			this.chartData.series.splice(0, this.chartData.series.length);
			this.http.get("/api/customer_jr_mobile/get_shuj", {}, true).then((s) => {
				s.k_type_bl.forEach(x => {
					this.chartData.series.push({
						name: x.models,
						data: Number(x.co),
					})
				})
			});
		}
	}
</script>

<style lang="less" scoped>
	.v-form-container {
		padding-bottom: 90rpx;
		background: #f9f9f9;
	}

	.v-form-title {
		font-size: 28rpx;
		color: #8f9ca2;
		padding: 4rpx 0 0rpx 20rpx;
	}

	.v-form-item {
		// box-shadow: 1px 1px 9px #efefef;
		margin: 20rpx;
		border: 1px solid #f1f1f1;
		border-radius: 10rpx;
		padding: 20rpx 4rpx;
		background: #FFFFFF;

		.grid-text {
			font-size: 24rpx;
			color: #4f4747;
			margin-top: 8rpx;
			margin-bottom: 20rpx;
		}
	}
</style>